#ifndef __VB_IMPL_H__
#define __VB_IMPL_H__

#include "includes.h"

#ifdef __cplusplus
extern "C"{
#endif

typedef struct trBLOCK_BUFFER_S {
    struct list_head list;
    int              ref;
    size_t           size;
    void             *pVirtAddr;
    void             *pPhyAddr;
    void             *handle;
    int              fd;
    void             *pAHBuf;//AHardwareBuffer
} BLOCK_BUFFER_S;

typedef struct trVB_POOL_S {
    struct list_head list_unused;
    struct list_head list_busy;
    int16_t totalCount;
    int16_t unusedCount;
} VB_POOL_S;

typedef struct trVB_MANAGER_S {
    VB_POOL_S *pools;
} VB_MANAGER_S;

#ifdef __cplusplus
}
#endif

#endif